import { defineStore } from "pinia";
import { searchKey } from "../store/key";

interface State {

searchUrl : string

}

export const useSearchStore = defineStore(searchKey, {
    state() {
        return {
           searchUrl:""
        }
    },
    actions: {
        updateSearchUrl(url:string) {
            this.searchUrl = url;
        },
    },
    getters: {
        getSearchUrl(state:State):string{
            return state.searchUrl;
        }
    },
    persist: true,
});